package com.tommy.ddp.manager
{
	import flash.display.Bitmap;
	
	import starling.textures.Texture;

	public class AssetsManager
	{
		[Embed(source="../libs/ball.png")]
		private static var ballCls:Class;
		
		[Embed(source="../libs/ball_x.png")]
		private static var ball_X_Cls:Class;
		
		[Embed(source="../libs/ball_y.png")]
		private static var ball_Y_Cls:Class;
		
		[Embed(source="../libs/ball_B.png")]
		private static var ball_B_Cls:Class;
		
		[Embed(source="../libs/ball_BC.png")]
		private static var ball_BC_Cls:Class;
		
		[Embed(source="../libs/ball_SB.png")]
		private static var ball_SB_Cls:Class;
		
		private static var _ballTexture:Texture;
		private static var _ball_X_Texture:Texture;                                                                                             
		private static var _ball_Y_Texture:Texture;
		private static var _ball_B_Texture:Texture;
		private static var _ball_BC_Texture:Texture;
		private static var _ball_SB_Texture:Texture;
		
		public function AssetsManager()
		{
		}
		
		public static function get ballTexture():Texture
		{
			if(!_ballTexture)
			{
				var bmp:Bitmap = new ballCls;
				_ballTexture = Texture.fromBitmap(bmp);
			}
			return _ballTexture;
		}
		
		public static function get ball_X_Texture():Texture
		{
			if(!_ball_X_Texture)
			{
				var bmp:Bitmap = new ball_X_Cls;
				_ball_X_Texture = Texture.fromBitmap(bmp);
			}
			return _ball_X_Texture;
		}
		
		public static function get ball_Y_Texture():Texture
		{
			if(!_ball_Y_Texture)
			{
				var bmp:Bitmap = new ball_Y_Cls;
				_ball_Y_Texture = Texture.fromBitmap(bmp);
			}
			return _ball_Y_Texture;
		}
		
		public static function get ball_B_Texture():Texture
		{
			if(!_ball_B_Texture)
			{
				var bmp:Bitmap = new ball_B_Cls;
				_ball_B_Texture = Texture.fromBitmap(bmp);
			}
			return _ball_B_Texture;
		}
		
		public static function get ball_BC_Texture():Texture
		{
			if(!_ball_BC_Texture)
			{
				var bmp:Bitmap = new ball_BC_Cls;
				_ball_BC_Texture = Texture.fromBitmap(bmp);
			}
			return _ball_BC_Texture;
		}
		
		public static function get ball_SB_Texture():Texture
		{
			if(!_ball_SB_Texture)
			{
				var bmp:Bitmap = new ball_SB_Cls;
				_ball_SB_Texture = Texture.fromBitmap(bmp);
			}
			return _ball_SB_Texture;
		}
	}
}